/**
 * 封装本地存储getItem,setItem
*/
/**
 * 封装getItem
*/
export const getItem = name =>{
      const data = window.sessionStorage.getItem('name')
   try{
      return JSON.parse(data)
       }catch(err){
        return data
   }
}
/**
 * 封装setItem
*/
export const setItem= (name,value) =>{
  if(typeof value === 'object'){
     value = JSON.stringify(value)
  }
  window.sessionStorage.setItem(name,value)
}
